import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  // mode: 'history',
  routes: [
    {
      path: '*',
      name: '*',
      component: r => require.ensure([], () => r(require('@/components/map/not')))
    },
    {
      path: '/',
      name: 'index',
      component: r => require.ensure([], () => r(require('@/components/map/map')))
    },
    {
      path: '/index',
      name: 'index2',
      component: r => require.ensure([], () => r(require('@/components/map/map')))
    },
    {
      path: '/login',
      name: 'login',
      component: r => require.ensure([], () => r(require('@/components/public/login')))
    },
    {
      path: '/map',
      name: 'map',
      component: r => require.ensure([], () => r(require('@/components/map/map')))
    },
    {
      path: '/chart',
      name: 'chart',
      component: r => require.ensure([], () => r(require('@/components/chart/chart')))
    },
    {
      path: '/chartSon',
      name: 'chartSon',
      component: r => require.ensure([], () => r(require('../components/chart/chartSon.vue')))
    },
    {
      path: '/creatOder',
      name: 'creatOder',
      component: r => require.ensure([], () => r(require('@/components/chart/creatOder')))
    },
    {
      path: '/adminConfig',
      name: 'AdminConfig',
      component: r => require.ensure([], () => r(require('@/components/admin/adminConfig')))
    },
    {
      path: '/adminDavise',
      name: 'adminDavise',
      component: r => require.ensure([], () => r(require('@/components/admin/davise')))
    },
    {
      path: '/Histroy',
      name: 'Histroy',
      component: r => require.ensure([], () => r(require('@/components/chart/histroy')))
    },
    {
      path: '/adminAddUser',
      name: 'adminAddUser',
      component: r => require.ensure([], () => r(require('@/components/admin/adminAddUser')))
    },
    {
      path: '/data',
      name: 'data',
      component: r => require.ensure([], () => r(require('@/components/map/data')))
    },
    {
      path: '/cityConfig',
      name: 'cityConfig',
      component: r => require.ensure([], () => r(require('@/components/admin/cityConfig')))
    },
    {
      path: '/mobli',
      name: 'mobli',
      component: r => require.ensure([], () => r(require('@/components/map/mobli')))
    },
    {
      path: '/adminChart',
      name: 'adminChart',
      component: r => require.ensure([], () => r(require('@/components/admin/adminChart')))
    },
    {
      path: '/adminDavislist',
      name: 'adminDavislist',
      component: r => require.ensure([], () => r(require('@/components/admin/adminDavislist')))
    },
    {
      path: '/adminAnanysist',
      name: 'adminAnanysist',
      component: r => require.ensure([], () => r(require('@/components/admin/adminAnanysist')))
    },
    {
      path: '/davisAnanysist',
      name: 'davisAnanysist',
      component: r => require.ensure([], () => r(require('@/components/admin/davisAnanysist')))
    },
    {
      path: '/mapDavis',
      name: 'mapDavis',
      component: r => require.ensure([], () => r(require('@/components/map/mapDavis')))
    }
  ]
})
